﻿@model WineStore.Models.Category
@{
    ViewBag.Title = "EditCategory";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}
<!-- Table (TABLE) -->
<h3 class="tit">
    Edit Category
</h3>
<fieldset>
    <legend>Edit Category</legend>
    @using (Html.BeginForm("EditCategory", "Category", FormMethod.Post, new { enctype = "multipart/form-data" }))
    { 
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.CategoryId)
        <table class="nostyle">
            <tbody>
                <tr>
                    <td>
                        Category Name:<span style="color: Red">(not null)</span>
                    </td>
                    <td>
                        @*name va id phai co gia tri giong ten truong trong database*@
                        @Html.EditorFor(model => model.CategoryName)
                    </td>
                    <td style="color: Red;">
                        @Html.ValidationMessageFor(model => model.CategoryName)
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="t-right">
                        <input type="submit" value="Edit Category" />
                    </td>
                </tr>
            </tbody>
        </table>
    }
</fieldset>
